function R = refl(alpha_i,alpha_t,n_air,n_tissue)
alpha_crit=asin(abs(n_air/n_tissue));
if(alpha_i>alpha_crit)
    R=1;
else
    R=1/2*((sin(alpha_i-alpha_t))^2/(sin(alpha_i+alpha_t))^2+(tan(alpha_i-alpha_t))^2/(tan(alpha_i+alpha_t))^2);
end
